#include"httplib.h"

using namespace httplib;
using namespace std;

#define SERVER_IP "192.168.223.16"
#define SERVER_PORT 9090

int main(){
    Client client (SERVER_IP,SERVER_PORT);//实例化client对象，用于搭建客户端

    MultipartFormData item;
    item.name = "file";
    item.filename = "hello.txt";
    item.content = "hello world!";//文件上传时，这里是文件内容
    item.content_type ="text/plain";
    MultipartFormDataItems items;
    items.push_back(item);

    auto res =client.Post("/multipart",items);

    cout<<res->status<<endl;
    cout<<res->body<<endl;
    return 0;
}